package com.hrm.mapper;

import com.hrm.pojo.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface UsersMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Users record);

    Users selectByPrimaryKey(Integer id);

    int update(Users record);

    @Select("select * from user_inf where loginname = #{loginname}")
    Users loginByName(String loginname);


    /**
     * 用户列表查询
     * @param status
     * @param loginname
     * @return
     */
    List<Users> selectByNameAndStatus(Integer status, String loginname);

    @Select("select * from user_inf where id = #{id}")
    Users getById(Integer id);
}